﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/FrontEnd.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    <%=(string)ViewData["CategoryName"]%>
    - vuonthieunhi.com
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="BreadCrumbContent" runat="server">
    <div class="breadcrumb">
        <span><a title="Chào mừng bạn đến với Vườn Thiếu Nhi." href="/">Trang chủ</a>&nbsp;&nbsp;
            <img src="../../Themes/images/breadcrumb_separator.gif" />&nbsp;
            <%=(string)ViewData["BreadCumb"] %></span>
    </div>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <% if (ViewData["HasSubCaterogry"] != null)
       {%>
    <table width="628" cellspacing="0" cellpadding="0" border="0" align="center">
        <tbody>
            <%int y = 0;
              List<GetCategoryResult> listCategory = (List<GetCategoryResult>)ViewData["CategoryMenu"];
              for (int i = 0; i < listCategory.Count; i += 4)
              {
            %>
            <tr>
                <%for (int z = 0; z < 4; z++)
                  {
                      if (y < listCategory.Count)
                      {
                          GetCategoryResult obj = listCategory[y];
                          string alias = "/danh-muc/" + obj.Alias + ".html";

                %>
                <td width="157" align="center">
                    <div <%=(string)ViewData["ClassName"] %>>
                        <table width="150" height="50" cellspacing="0" cellpadding="0" border="0">
                            <tbody>
                                <tr>
                                    <td align="center">
                                        <a title="baby capsules" href="<%=alias %>"><span>
                                            <%=obj.CategoryName%></span></a>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </td>
                <%y++;
                      }
                  }
                %>
            </tr>
            <%} %>
        </tbody>
    </table>
    <%}
       else
       {%>
    <ul style="list-style: none; width: 630px;">
        <% List<sp_GetPartnerResult> listNewPartner = (List<sp_GetPartnerResult>)ViewData["ListProduct"];
           foreach (sp_GetPartnerResult item in listNewPartner)
           {
               string alias = "/san-pham/" + item.Alias + ".html";
        %>
        <li style="width: 150px; float: left; padding-bottom: 10px;">
            <div class="prodformat_box">
                <div class="roundedcornr_top">
                </div>
                <div class="roundedcornr_content">
                    <a href="<%=alias%>">
                        <img class="imag" src="<%=Constants.UPLOAD_VITUAL_IMAGE_PATH + item.Logo%>" width="132"
                            height="120" />
                    </a>
                    <div class="prodname_newrelease">
                        <a href="<%=alias%>"><strong>
                            <%= Html.Encode(item.PartnerName)%></strong></a></div>
                    <br />
                    <% 
string cssClass = (string)ViewData["CssClass"];
string strInfo = "";
if (item.OldPrice.HasValue)
{
    strInfo = "<em>Giảm giá !</em><br />";
    cssClass = "pricebg_special";
}
else if (item.IsNew)
{
    strInfo = "<em>Hàng mới !</em><br />";
} %>
                    <div class="<%=cssClass %>">
                        <table class="prodprice_special">
                            <tbody>
                                <tr>
                                    <td>
                                        <%=strInfo %>
                                        <%=(!item.CurrentPrice.HasValue? "Liên hệ" : String.Format("{0:0,0}", item.CurrentPrice))%>
                                        <div class="prodrrpprice">
                                            <%if (item.OldPrice.HasValue)
                                              {
                                                  Response.Write(!item.OldPrice.HasValue ? "Liên hệ" : String.Format("{0:0,0}", item.OldPrice.Value));
                                              } %>
                                        </div>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
                <div class="roundedcornr_bottom">
                    <div>
                    </div>
                </div>
            </div>
        </li>
        <%} %>
    </ul>
    <%}%>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MetaContent" runat="server">
    <meta name="keywords" content="<%=(string)ViewData["CategoryName"]%>" />
    <meta name="description" content="<%=(string)ViewData["CategoryName"]%>" />
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="TopTitleContent" runat="server">
    <%=(string)ViewData["TitleHeader"]%>
</asp:Content>
